﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true"
    CodeFile="news.aspx.cs" Inherits="news" %>

<%@ Import Namespace="Avatar.Common" %>
<%@ Import Namespace="Avatar.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_Main" runat="Server">
    <div style="height: 2px;">
    </div>
    <table width="980" border="0" align="center" cellpadding="0" style="border-right: #46c8e8 1px solid;
        border-top: #46c8e8 1px solid; border-left: #46c8e8 1px solid; border-bottom: #46c8e8 1px solid"
        cellspacing="0">
        <tbody>
            <tr>
                <td height="40" align="center" bgcolor="#DBEBFA">
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tbody>
                            <tr>
                                <td width="2%" class="searchtitle">
                                    &nbsp;
                                </td>
                                <td width="10%" height="30" class="searchtitle">
                                    请选择分类名称:
                                </td>
                                <td width="15%">
                                    <asp:DropDownList ID="ddl_NewsCategory" runat="server" DataSourceID="SqlDataSource1"
                                        DataTextField="Name" DataValueField="ID">
                                    </asp:DropDownList>
                                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AvatarConnectionString %>"
                                        SelectCommand="SELECT [ID], [Name] FROM [NewsCategory]"></asp:SqlDataSource>
                                </td>
                                <td width="6%" class="searchtitle">
                                    发布时间:
                                </td>
                                <td width="11%">
                                    <asp:DropDownList ID="ddl_Date" runat="server">
                                        <asp:ListItem Value="365">所有日期</asp:ListItem>
                                        <asp:ListItem Value="0">今天</asp:ListItem>
                                        <asp:ListItem Value="2">最近三天</asp:ListItem>
                                        <asp:ListItem Value="6">最近一周</asp:ListItem>
                                        <asp:ListItem Value="30">最近一月</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td width="5%">
                                    关键词:
                                </td>
                                <td width="19%" style="text-align: center">
                                    <div align="left">
                                        <asp:TextBox ID="txt_KeyWord" runat="server"></asp:TextBox>
&nbsp;</div>
                                </td>
                                <td width="32%" style="text-align: center">
                                    <div align="left">
                                        <asp:Button ID="btn_Search" runat="server" CssClass="Button" Text="搜索" OnClick="btn_Search_Click" />
                                        &nbsp;</div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    <div style="height: 8px;">
    </div>
    <table width="980" border="0" align="center" cellpadding="0" style="border-right: #46c8e8 1px solid;
        border-top: #46c8e8 1px solid; border-left: #46c8e8 1px solid; border-bottom: #46c8e8 1px solid"
        cellspacing="0">
        <tbody>
            <tr>
                <td align="middle" background="./images/news/it03.jpg" height="27">
                    <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tbody>
                            <tr>
                                <td align="left">
                                    <span class="tm" style="padding-left:60px; color:White;"><b>资声资讯</b></span>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="photo" id="index_jpgz">
                        <div align="center">
                            <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                                <tbody>
                                    <tr>
                                        <td height="8">
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <asp:ListView ID="ListView1" runat="server" DataKeyNames="ID">
                                <ItemTemplate>
                                    <tr>
                                        <td style="text-align:left; background-color:White;">
                                                <%# ((NewsCategory)Eval("NewsCategory")).Name%>
                                        </td>
                                        <td style="text-align:left; background-color:White;">
                                            <a href="./NewsView.aspx?id=<%#Eval("ID") %>" target="_blank">
                                                <%# Eval("Title") %></a>
                                        </td>
                                        <td style="text-align:left; background-color:White;">
                                            <%# Eval("PublishDate") %>
                                        </td>
                                        <td style="text-align:left; background-color:White;">
                                            <%# Eval("Hits") %>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <EmptyDataTemplate>
                                                <table width="98%" border="0" align="center"
                                                    cellpadding="3" cellspacing="1" bgcolor="#DDDDDD" class="maintable0">
                                                    <tr style="">
                                                        <th width="96" height="22" align="left" bgcolor="#EAEAEA">
                                                            分类
                                                        </th>
                                                        <th width="550" height="22" align="left" bgcolor="#EAEAEA">
                                                            标题
                                                        </th>
                                                        <th width="190" height="22" align="left" bgcolor="#EAEAEA">
                                                            发布时间
                                                        </th>
                                                        <th width="91" height="22" align="left" bgcolor="#EAEAEA">
                                                            点击
                                                        </th>
                                                    </tr>
                                                    <tr>
                                                    <td colspan="3" style=" text-align:center; background-color:White;">暂无内容</td>
                                                    </tr>
                                                </table>
                                 </EmptyDataTemplate>
                                <LayoutTemplate>
                                    <table runat="server">
                                        <tr runat="server">
                                            <td runat="server">
                                                <table id="itemPlaceholderContainer" runat="server" width="98%" border="0" align="center"
                                                    cellpadding="3" cellspacing="1" bgcolor="#DDDDDD" class="maintable0">
                                                    <tr runat="server" style="">
                                                        <th id="Th1" runat="server" width="96" height="22" align="left" bgcolor="#EAEAEA">
                                                            分类
                                                        </th>
                                                        <th id="Th2" runat="server" width="550" height="22" align="left" bgcolor="#EAEAEA">
                                                            标题
                                                        </th>
                                                        <th runat="server" width="190" height="22" align="left" bgcolor="#EAEAEA">
                                                            发布时间
                                                        </th>
                                                        <th runat="server" width="91" height="22" align="left" bgcolor="#EAEAEA">
                                                            点击
                                                        </th>
                                                    </tr>
                                                    <tr id="itemPlaceholder" runat="server">
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </LayoutTemplate>
                            </asp:ListView>
                            <table width="98%">
                                <tr>
                                    <td style="text-align:right;">
                                        <asp:Label ID="lbl_Current" runat="server" />/
                                        <asp:Label ID="lbl_Total" runat="server" />
                                        <asp:Button ID="btn_Up" runat="server" Text="上一页" onclick="btn_Up_Click" />
                                        <asp:Button ID="btn_Down" runat="server"
                                            Text="下一页" onclick="btn_Down_Click" /><asp:TextBox ID="txt_Page" Width="50" runat="server"></asp:TextBox>
                                        <asp:Button
                                                ID="btn_Goto" runat="server" Text="转到" onclick="btn_Goto_Click" />
                                    </td>
                                </tr>
                            </table>
                            <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="lbl_Error" runat="server" ForeColor="Red" EnableViewState="false" />
                                    </td>
                                </tr>
                            </table>
                            <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                                <tbody>
                                    <tr>
                                        <td height="8">
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    </asp:Content>
